<%@ page import="java.util.UUID" %><%--
  Created by IntelliJ IDEA.
  User: xjy
  Date: 2022/3/16
  Time: 12:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加路线</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.6.0.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/linkageProvinceCity.js"></script>

    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>新增路线</h1>
            </div>
        </div>
        <div class="row">
            <div class="col-md-4 colum">
                <a class="btn btn-default href="${pageContext.request.contextPath}/user/toAddPage">新增书籍</a>
            </div>
        </div>
    </div>

    <%
        UUID uuid = UUID.randomUUID();
    %>

    <form action="${pageContext.request.contextPath}/path/addPath" method="post" enctype="multipart/form-data">

        <div class="form-group">
            <label for="pid">路线编号</label>
            <input type="text" name="pid" class="form-control" id="pid" value="<%=uuid%>" required>
        </div>
        <div class="form-group">
            <label for="pathname">路线名</label>
            <input type="text" name="pathname" class="form-control" id="pathname" required>
        </div>
        <div class="form-group">
            <label for="selectProv">省份</label>
            <select id="selectProv" onchange="prov_onChange()" name="province" class="form-select" aria-label="Default select example">
                <option>请选择省份</option>
            </select>

        </div>
        <div class="form-group">
            <label for="selectProv">城市</label>
            <select id="selectCity" onchange="city_onChange()" name="city" class="form-select" aria-label="Default select example">
                <option>请选择市区</option>
            </select>
        </div>
        <%--<div class="form-group">
            <label for="province">省份</label>
            <input type="text" name="province" class="form-control" id="province" required>
        </div>
        <div class="form-group">
            <label for="city">城市</label>
            <input type="text" name="city" class="form-control" id="city" required>
        </div>--%>

        <div class="form-group">
            <label for="daytime">日期</label>
            <input type="text" name="daytime" class="form-control" id="daytime" required>
        </div>
        <div class="form-group">
            <label for="price">价格</label>
            <input type="text" name="price" class="form-control" id="price" required>
        </div>
        <div class="form-group">
            <label for="intro">简介</label>
            <input type="text" name="intro" class="form-control" id="intro" required>
        </div>
        <div class="form-group">
            <label for="file">图片</label>
            <input type="file" name="file" class="form-control" id="file" required>
        </div>
        <div class="form-group">
            <label for="descr">描述</label>
            <input type="text" name="descr" class="form-control" id="descr" required>
        </div>
        <button type="submit" class="btn btn-default">Submit</button>
    </form>
</div>

</body>
</html>
